<?php

/**
 * ip from
 * 
 */
require_once("config.php");
require_once("DB_class.php");
@$ip = $_SERVER['REMOTE_ADDR'];
$cip = explode('.', $ip);
$gip = ("$cip[0].$cip[1].$cip[2]");
$db = new DB_c();
$db->db_connect($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
$db->query("SELECT * FROM geo_country WHERE start_ip LIKE '$gip%'");
$getinfo = $db->fetch_array();
echo "$ip<br />";
echo("You come From $getinfo[name]");
?>